home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / graphics / h-m / ie / install < prev    next >
Text File  |  1995-12-21  |  4KB  |  142 lines

  1. ; Install Image Engineer V2.1
  2. ; © 1995 Simon Edwards
  3. ; This script installs Image Engineer.  Checks for need libraries, OS version
  4. ; CPU, installs IE.config to S: and adds an assign to user-startup.
  5.  
  6. (transcript "Installing Image Engineer...")
  7.  
  8. (set #intromsg (cat    "\nThis installs Image Engineer V2.1 on your\n"
  9.             "hard disk and checks your Kickstart, CPU, and\n"
  10.             "installed libraries.\n"))
  11.  
  12. (message #intromsg)
  13.  
  14.     ;Check to see what version of the OS we're running on.
  15. (if (< (/ (getversion) 65536) 37)
  16.     (
  17.     (if (<> 1 (askbool (help @askbool-help) (prompt (cat "You must be using Kickstart 2.04+ to run Image Engineer.\n"
  18.                     "\n"
  19.                     "Do you wish to continue anyway?\n"))))
  20.  
  21.         (
  22.         (abort "Aborting as the Kickstart is not sufficient.")
  23.         )
  24.     )
  25.     )
  26. )
  27.  
  28.  
  29.     ; Check to see what CPU we're running on.
  30. (if (>= 68020 (database "cpu"))
  31.     (
  32.     (if (<> 1 (askbool (help @askbool-help) (prompt (cat
  33.                     "\nYou need a 68020 CPU or better to run Image Engineer.\n"
  34.                     "\nDo you wish to continue anyway?\n"))))
  35.         (
  36.         (abort "Aborting as the CPU is not sufficient.")
  37.         )
  38.     )
  39.     )
  40. )
  41.  
  42.  
  43.     ;Check to see if superview.library is installed.
  44. (if (exists "LIBS:superview.library")
  45.     (
  46.     (set vernum (getversion "LIBS:superview.library"))
  47.     (if (< vernum (+ (* 11 65536) 10)) 
  48.         (
  49.         (set ver (/ vernum 65536))
  50.         (set rev (- vernum (* ver 65536)))
  51.         (message (cat (
  52.             "\nYou have V%ld.%ld of superview.library,\n" ver rev)
  53.             "although Image Engineer will run with this version\n"
  54.             "I recommend that you get V11.10 from Aminet or your\n"
  55.             "local PD library. (See docs)."))
  56.         )
  57.     )
  58.     )
  59.  
  60.     (
  61.     (if (<> 1 (askbool (help @askbool-help) (prompt     
  62.         (cat    "\nYou don't seem to have superview.library installed\n"
  63.             "on your system.  Image Engineer needs at least V7.0\n"
  64.             "of superview.library in order to run.\n\n"
  65.             "Do you wish to continue anyway?\n"))))
  66.             (
  67.  
  68.             (abort (cat
  69.                 "Aborting...\n\n"
  70.                 "The latest version of superview.library\n"
  71.                 "should be available from an Aminet site\n"
  72.                 "or PD library near you.\n"))
  73.             )
  74.  
  75.     )
  76.     )
  77. )
  78.  
  79.     ;Get the destination directory from the user
  80. (set wheredir
  81.     (askdir
  82.     (prompt "Select a directory where you would like to install "
  83.         "Image Engineer. (A drawer will be created there)")
  84.     (help @askdir-help)
  85.     (default @default-dest)
  86.     )
  87. )
  88.  
  89.     ;Create the directory for Image Engineer
  90. (set wheredir (tackon wheredir "ImageEngineerV2.1"))
  91. (makedir wheredir (infos))
  92.  
  93.  
  94. (working "Installing Image Engineer...")
  95.     ;Copy all of the files over to the destination
  96. (copyfiles
  97.     (prompt "")
  98.     (help @copyfiles-help)
  99.     (pattern "~(Install|Install.info)")
  100.     (infos)
  101.     (source (pathonly @icon))
  102.     (dest wheredir)
  103. )
  104.  
  105.     ;Add an assign to user startup
  106. (startup "IMAGEENGINEER"
  107.     (prompt "I need to add an assign to your\n\"s:user-startup\" file.")
  108.     (help @startup-help)
  109.     (command ("assign IE: \"%s\"\n" wheredir))
  110. )
  111.  
  112.     ;Copy new IE.config file to S:
  113. (if (exists "s:IE.config")
  114.     (
  115.     (if (<> (getsize "s:IE.config") 5238)
  116.         (
  117.         (copyfiles (prompt "Copying new IE.config") (help @copyfiles-help) 
  118.             (source "IE.config") (dest "s:") (files))
  119.         )
  120.  
  121.         (
  122.         (if (askbool (help @askbool-help) (prompt     
  123.             (cat    "\nMay I copy the new IE.config over\n"
  124.                 "your current IE.config file?\n")))
  125.                 (
  126.                 (copyfiles (prompt "Copying new IE.config") (help @copyfiles-help) 
  127.                     (source "IE.config") (dest "s:") (files))
  128.                 )
  129.  
  130.             )
  131.         )
  132.         )
  133.     )
  134.  
  135.     (
  136.     (copyfiles (prompt "Copying new IE.config") (help @copyfiles-help) 
  137.         (source "IE.config") (dest "s:IE.config"))
  138.     )
  139. )
  140.  
  141. (exit "Please reboot your computer before running\nImage Engineer.")
  142.